<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">

  <object id="CommonService" type="Framework.Impl.Service.CommonService, Framework.Impl">
    <property name="Dao" ref="ClassicDao"/>
    <property name="Cache" ref="AspNetCache"/>
    <!--<property name="Scheduler" ref="QuartzScheduler"/>-->
  </object>

  <object id="AspNetCache" type="Spring.Caching.AspNetCache, Spring.Web">
    <property name="SlidingExpiration" value="true"/>
    <property name="TimeToLive" value="00:22:00"/>
  </object>

  <!--Wcf ServiceModel Extensions 仅处理此列表登记的类型-->

  <object id="WcfInterceptor" lazy-init="true" type="System.Collections.ArrayList,mscorlib">
    <constructor-arg>
      <list>
        <object type="Framework.Integration.WCF.NHibernate.HibernateDataContractSurrogate, Framework.Integration"/>
        <object type="Framework.Integration.WCF.FaultErrorHandler, Framework.Integration"/>
        <ref object="WcfMsgLog"/>
      </list>
    </constructor-arg>
  </object>
  <object id="WcfOsiv" lazy-init="true" type="Spring.Data.NHibernate.Support.SessionScope"/>
  <object id="WcfMsgLog" lazy-init="true" type="Framework.Integration.WCF.DispatchMessageInspector, Framework.Integration">
    <constructor-arg name="enableLog" value="false"/>
    <constructor-arg name="osiv" ref="WcfOsiv"/>
  </object>
  <!--事务自动AOP控制-->
  <object name="autoProxyCreator" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator, Spring.Aop">
    <property name="InterceptorNames" value="transactionInterceptor"/>
    <property name="ObjectNames">
      <list>
        <value>*Service</value>
        <value>*Bll</value>
      </list>
    </property>
  </object>

  <object id="transactionInterceptor" type="Spring.Transaction.Interceptor.TransactionInterceptor">
    <property name="TransactionManager" ref="TxManager"/>
    <property name="TransactionAttributes">
      <name-values>
        <add key="Save*" value="PROPAGATION_REQUIRED"/>
        <!--拦截方法名-->
        <add key="Find*" value="PROPAGATION_SUPPORTS,readOnly"/>
      </name-values>
    </property>
  </object>


  <object id="TxManager"  type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate30">
    <property name="DbProvider" ref="DbProvider"/>
    <property name="SessionFactory" ref="SessionFactory"/>
  </object>
</objects>